    <div class="container top">
      
      <ul class="breadcrumb">
        <li>
          <a href="<?php echo site_url("admin"); ?>">
            <?php echo ucfirst($this->uri->segment(1));?>
          </a> 
          <span class="divider">/</span>
        </li>
        <li>
          <a href="<?php echo site_url("admin").'/'.$this->uri->segment(2); ?>">
            <?php echo ucfirst($this->uri->segment(2));?>
          </a> 
          <span class="divider">/</span>
        </li>
        <li class="active">
          <a href="#">New</a>
        </li>
      </ul>
      
      <div class="page-header">
        <h2>
          Add New Employee
        </h2>
      </div>
 
      <?php
    
      
      
       //effedt messages
    if($this->session->flashdata('num_row_effected')){
              echo '<div class="alert alert-error">';
              echo '<a class="close" data-dismiss="alert">×</a>';
              echo '<strong>Alert! '.$this->session->flashdata('table').' Table: </strong> Added '.$this->session->flashdata('num_row_effected').' rows.';
              echo '</div>'; 
       
        
    }
    if($this->session->userdata('error')){
              echo '<div class="alert alert-error">';
              echo '<a class="close" data-dismiss="alert">×</a>';
              echo '<strong>Alert! '.$this->session->flashdata('table').' Table: </strong> Error:  '.$$this->session->userdata('error');
              echo '</div>'; 
    }
  //-----------------------------------------------------------------------------------------
      
      //flash messages
      if(isset($flash_message)){
        if($flash_message == TRUE)
        {
          echo '<div class="alert alert-success">';
            echo '<a class="close" data-dismiss="alert">×</a>';
            echo '<strong>Well done!</strong> new employee created with success.';
          echo '</div>';       
        }else{
          echo '<div class="alert alert-error">';
            echo '<a class="close" data-dismiss="alert">×</a>';
            echo '<strong>Oh snap!</strong> change a few things up and try submitting again.';
          echo '</div>';          
        }
      }
      ?>
      
      <?php
      //form data
      $attributes = array('class' => 'form-horizontal', 'id' => '');
      $options_manufacture = array('' => "Select");
//      foreach ($manufactures as $row)
//      {
//        $options_manufacture[$row['id']] = $row['name'];
//      }

      //form validation
      echo validation_errors();
      
      echo form_open('index.php/employee/add', $attributes);
      ?>
        <fieldset>
          <div class="control-group">
            <label for="emp_id" class="control-label">Emp_ID:</label>
            <div class="controls">
                <input type="text" id="emp_id" name="emp_id" value="<?php echo set_value('emp_id'); ?>" placeholder="Employee ID">
              
            </div>
          </div>
           <div class="control-group">
            <label for="inputError" class="control-label">Name:</label>
            <div class="controls">
              <input type="text" id="name" name="name" value="<?php echo set_value('name'); ?>"  placeholder="Employee Name">
             
            </div>
          </div>
           <div class="control-group">
            <label for="birthday" class="control-label">Birthday:</label>
            <div class="controls">
                <input type="date" id="birthday" name="birthday" >
            </div>
          </div>
         <div class="control-group">
            <label for="email" class="control-label">Email:</label>
            <div class="controls">
                <input type="email" id="email" name="email" value="<?php echo set_value('email'); ?>"  placeholder="Email">
             
            </div>
         </div>
         
           <div class="control-group">
            <label for="emp_level" class="control-label">Employee Level:</label>
            <div class="controls" >
                <select name="emp_level">
                    <option value="EMPLOYEE">Employee</option>
                    <option value="HR_LEARDER">HR Leader</option>
                    <option value="PROJECT_MANAGER">Project manager</option>
                    <option value="DIRECTOR">Director</option>
                </select>
             
            </div>
         </div>
            
            <div class="control-group">
            <label for="tax_num" class="control-label">Tax Number:</label>
            <div class="controls">
                <input type="number" id="tax_num" name="tax_num" value="<?php echo set_value('tax_num'); ?>"  placeholder="Tax number">
             
            </div>
         </div>
              <div class="control-group">
            <label for="sal" class="control-label">Salary:</label>
            <div class="controls">
                <input type="number" id="sal" name="sal" value="<?php echo set_value('sal'); ?>"  placeholder="Salary">
             
            </div>
         </div>
            
          
           <div class="control-group">
            <label for="dept_id" class="control-label">Department :</label>
            <div class="controls">
                <select name="dept_id">
                    <?php
                         foreach ($department as $row) {
                             echo '<option value="'.$row[0].'">'.$row[1].'</option>';
                        }
                     ?>
                </select>
             
            </div>
         </div>
          <div class="form-actions">
            <button class="btn btn-primary" type="submit">Create</button>
            <button class="btn" type="reset">Reset</button>
            <a  href="<?php echo base_url("index.php/employee") ?>" class="btn">Cancel</a>
          </div>
        </fieldset>

      <?php echo form_close(); ?>

    </div>
     